<% if (si= @slideshow.slideshow_images(true)).size > 0 %>
<p class="reorder_link">
<%= link_to_remote 'Reorder', :update => 'image_list', 
:after => "insertWaitingImg('image_list')",
:url => {:controller => 'slideshows', :action => 'edit_order', :id => @slideshow} %>
</p>
<ul class="slide_list">
<% si.each_with_index do |@slideshow_image, i| %>

<li class="slide" id="slide_<%=i%>" onmouseover="show_delete(<%=i%>)" onmouseout="hide_delete(<%=i%>)">

<table class="box_container">
<tr><td class="white_box">
    <table class="box">
    <tr><td>
    <%= image_tag(url_for_file_column('slideshow_image', 'image_url', 'thumb'), :id=>"img_#{i}", :class=>"slide_image") %>
    </td></tr>
    <tr><td id="box_text_<%=i%>" class="box_text"><p>
    <%= sound_duration(@slideshow_image.duration) %> <br/>
    <%= link_to_remote('Edit',:update => "box_text_"+ i.to_s,:after => "insertWaitingImg('box_text_"+i.to_s+"')", :url => {:controller => 'slideshows', :action => 'edit_slide_duration', :id => @slideshow_image.id}, :complete => "select_thumb('slide_#{i}')")%>
    </p>
    </td></tr>
    </table>
</td><td class="delete_box">

<%= link_to_remote(image_tag('delete.gif', :id => 'delete_'+i.to_s), :update => 'slides',:after => "insertWaitingImg('delete_"+i.to_s+"')", :url => {:controller => 'slideshows', :action => 'delete_slide', :id => @slideshow_image.id}, :confirm => 'Are you sure?') %>

</td></tr></table></li>

<% end %>
</ul>
<% end %>
